/*
 * Copyright (C) 2010-2011 Graz University of Technology, Austria. All Rights reserved. 
 *
 * Contact: Simone Kopeinik <simone.kopeinik@tugraz.at>
 * 	   Graz University of Technology, Knowledge Management Institute, Brückenkopfgasse 1/6, 8020 Graz 	
 * 	   <http://www.kmi.tugraz.at/>
 * 
 * This software is part of the TARGET platform developed by the
 * TARGET EC-funded project www.reachyourtarget.org
 *
 * This software is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * The GNU General Public License is available at <http://www.gnu.org/licenses/>.
 *
 */
package at.tugraz.kmi.css.cbkst2.prereq;

import at.tugraz.kmi.css.cbkst2.CbKSTVertex;
import at.tugraz.kmi.css.cbkst2.PrerequesiteOrderSet;
import at.tugraz.kmi.css.cbkst2.PrerequesiteRelation;
import edu.uci.ics.jung.graph.DirectedGraph;
import edu.uci.ics.jung.graph.ObservableGraph;
import edu.uci.ics.jung.graph.event.GraphEventListener;

/**
 * Interface for Graph Based {@link PrerequesiteOrderSet}'s. Allows to add Graph
 * listeners to a POS set.
 * 
 * @author Georg Öttl
 * 
 * @param <V>
 *            The vertices implementation for the graph representation.
 * @param <E>
 *            The edges implementations to be used.
 */
public interface PrerequesiteOrderSetGraph<V extends CbKSTVertex, E extends PrerequesiteRelation>
		extends DirectedGraph<V, E>, PrerequesiteOrderSet<V> {

	/**
	 * Adds {@code l} as a listener to this graph.
	 * 
	 * @param l
	 *            The graph event listener to add.
	 */
	void addGraphEventListener(GraphEventListener<V, E> l);

	/**
	 * Removes {@code l} as a listener to this graph.
	 * 
	 * @param l
	 *            The event listener to remove.
	 */
	void removeGraphEventListener(GraphEventListener<V, E> l);

	/**
	 * @return The calculated transitive closure graph.
	 */
	ObservableGraph<V, E> getTransitiveClosureGraph();
}
